<%@page import="dao.DataAccess"%>
<%@page import="java.util.ArrayList"%><%@ page language="java"
	contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Make a Transaction : Step One</title>
<link
	href="<%=request.getContextPath()%>/CSS/ui-darkness/jquery-ui-1.9.2.custom.css"
	rel="stylesheet">
<script src="<%=request.getContextPath()%>/JS/jquery-1.8.3.js"></script>
<script src="<%=request.getContextPath()%>/JS/jquery-ui-1.9.2.custom.js"></script>
<script>
	$(function() {
		$("#tabs").tabs({
			collapsible : true,
		});
		$("#one").button();
		$("#two").button();
		$("#radioset").buttonset();

		$("#tabs").tabs("option", "disabled", [ 1, 2 ]);
		

		// Link to open the dialog
		$("#one").click(function(event) {
			//	alert("Button Clicked");
			$("#tabs").tabs("option", "disabled", [ 2 ]);
			$("#tabs").tabs("option", "active", [ 1 ]);
			event.preventDefault();
		});
		$("#two").click(function(event) {
			var value = $("#firstValue").text();
			alert($(value).val());
			$("#tabs").tabs("option", "disabled", [0,1]);
			$("#tabs").tabs("option", "active", [ 2 ]);
			event.preventDefault();
		});
	});
</script>
</head>
<body>
	<%
		ArrayList<String> ALENameList = DataAccess.fetchALEName();
	%>
	<form name=masterForm>
		<div id="tabs">
			<ul>
				<li><a href="#tabs-1">Describe it</a></li>
				<li><a href="#tabs-2">Where To ?</a></li>
				<li><a href="#tabs-3">Where From ?</a></li>
			</ul>
			<div id="tabs-1">
				<p>
					<strong>Description Pane</strong>
				</p>
				<p>This will have a field, asking the user to fill in a
					description of the type of Transaction.</p>

				<p>Tell us what this is about</p>
				<p>
					<input type="text" name="description" size="40" height="20">
				</p>
				<input type="hidden" name="whereFrom" value="tabOne">
				<button id="one">Next</button>
			</div>
			
			
			
			
			<div id="tabs-2">
				<p>
					<strong>Debit Pane</strong>
				</p>
				<p>Where did the money go to? i.e., Debit.</p>

				<select name="ale">
					<%
						if (ALENameList != null) {
							for (int i = 0; i < ALENameList.size(); i++) {
					%>
					<option><%=ALENameList.get(i)%></option>
					<%
						}
						}
					%>
				</select>

				<p>Value (How much?)</p>
				<input type="text" name="firstValue" id="firstValue">
				<button id="two">Next</button>
			</div>
			<div id="tabs-3">
				<p>
					<strong>Click this tab again to close the content pane.</strong>
				</p>

				<p>Value of Transaction =</p>
				<p>Where did the money come from ? i.e., Credit.</p>


				<select name="ale">
					<%
						if (ALENameList != null) {
							for (int i = 0; i < ALENameList.size(); i++) {
					%>
					<option><%=ALENameList.get(i)%></option>
					<%
						}
						}
					%>
				</select>
			</div>
		</div>

	</form>

</body>

</html>